package com.example.newspublish.exception;

import com.example.newspublish.pojo.result.ResultCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 自定义业务异常
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class NewsServiceException extends RuntimeException{

    private ResultCodeEnum resultCodeEnum;


    public NewsServiceException(ResultCodeEnum resultCodeEnum, String message) {
        super(message);
        setResultCodeEnum(resultCodeEnum);

    }

}